<div class="form">

	<?php
	$properties = array(
		'id'=>'member-image-form',
		'htmlOptions'=>array('enctype'=>'multipart/form-data'),
		'enableAjaxValidation'=>false,
	);
	$form = $this->beginWidget('CActiveForm', $properties);
	?>

	<p class="note">
		Fields with <span class="required">*</span> are required.
	</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php
		echo $form->labelEx($model, 'name');
		$htmlOptions = array('size'=>60, 'maxlength'=>255, 'class'=>'fill');
		$properties = array(
			'model'=>$model,
			'attribute'=>'name',
			'source'=>$model->nameList,
			'options'=>array(
				'minLength'=>'1',
			),
			'htmlOptions'=>$htmlOptions,
		);
		$this->widget('zii.widgets.jui.CJuiAutoComplete', $properties);
		echo $form->error($model, 'name');
		?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model, 'file'); ?>
		<?php echo $form->fileField($model,
				'file'); ?>
		<?php echo $form->error($model, 'file'); ?>
	</div>

	<div class="row buttons">
		<?php
		$label = $model->isNewRecord ? 'Create' : 'Save';
		echo CHtml::submitButton($label);
		?>
	</div>

	<?php $this->endWidget(); ?>

</div><!-- form -->